Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Present SRS metadata with a colored pill, instead of raw text attributes #134

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tntmarket
Copy link
Contributor

This reverts to the [[]] style of block properties, in order to be able to fully hide the metadata with css. The metadata is still readable if you edit the block.

It displays the review interval, and colors the pill according to the ease factor.

I'm not sure if I should include the css in roam-toolkit itself. Maybe better to link to some example css in the documentation, in case it looks ugly with certain css themes, or if people want to tune the presentation based on values.

Screen Shot 2020-07-12 at 3 20 19 AM

Here is the full css being generated: https://gist.github.com/tntmarket/9dc7179e9c8c0357b87fbbeed3eedfc9

@tntmarket tntmarket added the srs label Jul 12, 2020
@sonarcloud
Copy link

sonarcloud bot commented Jul 12, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@Stvad
Copy link
Member

Stvad commented Jul 12, 2020

I like it but am a bit conflicted :)
The reason for moving away from the old format was to get rid of thousands of additional pages generated by liberal use of SRS (each unique interval and each unique factor gets a page)

Regarding injecting CSS - I think it's ok to do so, as long as people can override styles (so we should have doc on those)

Also a majority of my prompts would be in 1+ month :) I'd like more granularity then that (probably up to a few years)

@Stvad
Copy link
Member

Stvad commented Jul 12, 2020

As a curiousity/fyi - another way to make the thing render in "special way" is to surround it with double {} like {{[[interval]]:5}}. That's gonna render as a button, won't create an additional page, but the button won't have the special css classes either though =\

.map(days => intervalStyle(`${days}.`, `${days} days`))
.join('\n')}
${range(7, 30)
.map(days => intervalStyle(`${days}.`, `${Math.floor(days / 7)} weeks`))
Copy link
Member

@Stvad Stvad Jul 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd actually like to see the fractions here (to a first decimal) (same for months/years)

@Stvad
Copy link
Member

Stvad commented Aug 16, 2020

the days should be shifted in +1 direction for this as the fractions are rounded up for the purposes of scheduling. so interval 4.2 would result in scheduling in 5 days.

@sonarcloud
Copy link

sonarcloud bot commented Aug 23, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@Jaydon-chai
Copy link

Is it possible to add css buttons that can do the function of ctrl-shift-x ? for how well recall is?

@Stvad
Copy link
Member

Stvad commented Aug 25, 2020

It's possible, but it'd involve more then just CSS, it'd require custom rendering of blocks. Which is not trivial (not that complicated either, but requires some work)

@sonarcloud
Copy link

sonarcloud bot commented Oct 11, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@Stvad
Copy link
Member

Stvad commented Oct 11, 2020

@tntmarket are you just updating the current version with latest changes from master, or did you find a way to make it work better?

@tntmarket
Copy link
Contributor Author

@tntmarket are you just updating the current version with latest changes from master, or did you find a way to make it work better?

Oh sorry, I've just been pushing my personal customizations to this branch, I'll start using another branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants